package com.jxl.charactersheet.factories
{
	import com.jxl.charactersheet.vo.inventory.WearableItem;
	import com.jxl.dnd.Attribute;
	import com.jxl.dnd.equipment.ItemEffect;
	import com.jxl.dnd.equipment.ItemEffectType;
	
	public class InventoryFactory
	{
		public static function getRandomWearableItem():WearableItem
		{
			var itemEffect:ItemEffect = new ItemEffect(new Attribute(Attribute.strength), 1, ItemEffectType.ADD);
			var nameNum:Number = Math.round(Math.random() * 1000);
			var slideNum:Number = Math.round(Math.random() * 3);
			var wearableItem:WearableItem = new WearableItem("some item " + nameNum, 
															 Math.round(Math.random() * 100),
															 Math.round(Math.random() * 10),
															 0,
															 itemEffect,
															 "http://www.jessewarden.com/pix/slide_0" + slideNum + ".jpg",
															 Math.round(Math.random() * 12));
			return wearableItem;
		}
		
		public static function getRandomWearableItems(amount:uint=0):Array
		{
			var list:Array = [];
			for(var index:uint = 0; index<amount; index++)
			{
				list[index] = getRandomWearableItem();
			}
			return list;
		}
	}
}